package cn.tedu.repository.impl;

import cn.tedu.bo.TestWorkerBO;
import cn.tedu.dao.TestDao;
import cn.tedu.dos.TestWorkerDO;
import cn.tedu.query.TestWorkerQuery;
import cn.tedu.repository.TestRepository;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class TestRepositoryImpl implements TestRepository {

    @Autowired
    private TestDao testDao;

    @Override
    public TestWorkerBO testWoker(TestWorkerQuery testWorkerQuery) {
        TestWorkerDO testWorkerDO=testDao.selectWorkerByUserId(testWorkerQuery);
        TestWorkerBO testWorkerBO = new TestWorkerBO();
        BeanUtils.copyProperties(testWorkerDO,testWorkerBO);
        return testWorkerBO;
    }
}
